#ifndef XTEXTFIELD_H
#define XTEXTFIELD_H

#include "XSystem/XWidget.h"

class XTextField : public XWidget
{
	public:
		XTextField(XResourcesManager *data, int positionX, int positionY, int width);
		void Draw();
		void CheckState(const sf::Input &input);
		void CheckEvent(const sf::Event &Event);

		void SetText(std::string text);
		std::string GetText();

		void SetPassword(bool isPassword);

		void SetFocus(bool focus);

	protected:
		sf::Shape x_background;
		sf::Shape x_blinker;
		sf::String x_string;

		std::string x_text;
		bool x_isPassword;

		int x_blinkerTimer;
		bool x_blinkerState;
};

#endif